#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stddef.h>

struct S
{
	char c1;
	int i;
	char c2;
};

#define OFFSETOF(type,m_name) (size_t)&(((type*)0)->m_name)
int main()
{
	printf("%d\n", OFFSETOF(struct S, c1));
	printf("%d\n", OFFSETOF(struct S, i));
	printf("%d\n", OFFSETOF(struct S, c2));

	/*printf("%d\n", offsetof(struct S, c1));
	printf("%d\n", offsetof(struct S, i));
	printf("%d\n", offsetof(struct S, c2));*/
	return 0;
}